package com.gadgets.busi.bm03;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.HashSet;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2021-03-05
 * @moduel gadgets
 * 
 */
public class RepeatPath {

    public static void main(String[] args) throws Exception{
        File file = new File("F:\\Code\\Other\\gadgets\\D1. Sources\\GadgetsBusi\\gadgets-bm03\\src\\main\\resources\\path.txt");
        BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
        String path = null;
        int i = 0;
        int j = 0;
        HashSet<String> pathSet = new HashSet<>();
        while (null!=(path=bufferedReader.readLine())){
            int index = path.indexOf("/src/");
            pathSet.add(path.substring(index));
        }
        System.out.println("文件路径:");
        i = 1;
        for (String s : pathSet) {
            if(s.contains(".java")||s.contains(".xml")||s.contains(".properties")||s.contains(".jsp")) {
                System.out.println(s);
                i++;
            }
        }
        System.out.println("重复内容数量"+j);
    }

}
